<template>
  <div v-show="true" class="app_box page">
    <i class="icon_logo icons"></i>
    <a v-show="false" class="app_open com_btn ano_color app_url" href="javascript:void(0)" target="_blank"
       id="open_app">在App内打开</a>
    <a @click="downApp" class="new_app_download com_btn ano_bg" href="javascript:void(0)" target="_blank">下载择天惠App</a>
  </div>
</template>

<script>
  import MDUtils from 'src/assets/js/md-utils.js'
  export default {
    name: "down-tip",
    methods: {
      downApp() {
        if (MDUtils.is_ios()) {
          let toUrl = "https://itunes.apple.com/cn/app/%E6%8B%A9%E5%A4%A9%E5%B0%8F%E6%83%A0-%E7%B2%BE%E9%80%89%E5%93%81%E7%89%8C%E4%BC%98%E6%83%A0/id1353972131?mt=8";
          window.location.href = toUrl
        } else if (MDUtils.is_Android()) {
          let toUrl = "http://a.app.qq.com/o/simple.jsp?pkgname=com.zetianquan.ztq.android";
          window.location.href = toUrl;
        }
      }
    }
  }
</script>

<style lang="less" scoped>
  .com_btn {
    display: inline-block;
    color: #fff;
    text-align: center;
    border-radius: 3px;
  }

  .app_box {
    padding: 10px 20px 10px 17px;
    background-color: #f7f7f7;
    text-align: center;
    &.page {
      line-height: 1;
      font-size: 14px;
      color: #333;
    }
    .icon_logo {
      width: 36px;
      height: 36px;
      margin-right: 5%;
      &.icons {
        display: inline-block;
        vertical-align: middle;
        background: url(../../wxStatic/img/logo.png) no-repeat center center;
        background-size: cover;
      }
    }
    .app_open {
      color: @red;
      margin-right: 5%;
      background-color: #fff;
    }
    a {
      width: 37%;
      line-height: 30px;
      border-radius: 3px;
      border: 1px solid #f54e54;
    }
    .new_app_download {
      color: #fff;
      background: @red;
    }
  }

</style>
